package model.daobase;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DBase {

    protected Connection conn;

    protected void init_mysql() {
        String className = "com.mysql.jdbc.Driver";
        String url= "jdbc:mysql://nosabo.dyndns.info:3306/elrinconteleco";                //"jdbc:mysql://nosabo.dyndns.info:3306/elrinconteleco";
        String user="root";
        String password ="sw22012";
        
        try{
            Class.forName(className);
            conn = DriverManager.getConnection(url, user, password);


        } catch (SQLException ex) {
            System.out.println("Parametros incorrectos");
            ex.printStackTrace();

        } catch (ClassNotFoundException ex) {
            ex.printStackTrace();
            System.out.println("No existe el driver");
        }



    }
}
